package com.kwok.rbac.application.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 员工表
 * </p>
 *
 * @author baomidou
 * @since 2024-05-24
 */
@TableName("it_employee")
@Data
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 员工编号
     */
    @TableId(value = "e_number", type = IdType.AUTO)
    private Integer eNumber;

    /**
     * 员工姓名
     */
    //@TableField("e_name")
    private String eName;

    /**
     * 员工职位
     */
    //@TableField("e_position")
    private String ePosition;

    /**
     * 入职时间
     */
    //@TableField("e_hiredate")
    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format="yyyy-MM-dd")
    private Date eHiredate;

    /**
     * 薪资
     */
    //@TableField("e_salary")
    private BigDecimal eSalary;

    /**
     * 奖金
     */
    //@TableField("e_bonus")
    private Double eBonus;

    /**
     * 领导工号
     */
    //@TableField("e_leader_number")
    private Integer eLeaderNumber;

    /**
     * 所在部门编号
     */
    //@TableField("d_number")
    private Integer dNumber;

    @TableField(exist = false)
    private String dName;

    @TableField(exist = false)
    private String leaderName;

}
